home *** CD-ROM | disk | FTP | other *** search
- Path: hickory.westol.com!news
- From: Mark Kintigh <breetai@oak.westol.com>
- Newsgroups: comp.lang.c
- Subject: Re: writing graphics to a file
- Date: Tue, 19 Mar 1996 09:55:20 -0800
- Organization: Westmoreland Online Inc.
- Message-ID: <314EF508.176A@oak.westol.com>
- References: <4iimo0$c6k@goanna.cs.rmit.EDU.AU>
- NNTP-Posting-Host: pm116.westol.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win16; I)
-
- Vincent Anthony Nativo wrote:
- >
- > I am just getting used to the C language and have a question. In Turbo C
- > for DOS, you can store graphics in void data items using the getimage
- > command. What is the best method for writing this data item to a file,
- > and reading it back into the data item so that it can be displayed using
- > the putimage command.
-
- The most basic method is dumping the memory directly to disk as a binary file.
- Just open a binary file, move x bytes from the void * to the disk and, tada!
- the graphic is saved (although not very efficently). :) To load it, just read
- in the binary file. (This is how I started playing with graphics.)
- --
- _____
- / /## breetai@oak.westol.com
- / /#### ____
- (| []/ o ##) "We met the enemy, and they were'nt us, then | _|||
- |\ \_/ /\ # /| we faced a pannel of 'us' and found they were || ||
- | \-\ ==== /-/ | the enemy." \\//
- ||\\ '----' //|| \/
- || \\/ \// ||
-